package top.lilele.adminSystem.numEnum;

/**
 * 项目状态枚举
 *
 * @author lilele
 */
public enum ProjectStatusEnum {
    /**
     * 已创建
     */
    CREATED(1, "已创建"),

    /**
     * 进行中
     */
    RUNNING(2, "进行中"),

    /**
     * 已结束
     */
    OVER(3, "已结束"),

    /**
     * 已挂起
     */
    HANG(4, "已挂起"),

    /**
     * 已逾期
     */
    OVER_TIME(5, "已逾期");

    private Integer type;
    private String message;

    ProjectStatusEnum(Integer type, String message) {
        this.type = type;
        this.message = message;
    }

    public static String getMessageByKeyId(Integer status) {
        ProjectStatusEnum[] projectStatusEnums = values();
        for (ProjectStatusEnum item : projectStatusEnums) {
            if (item.getType().equals(status)) {
                return item.getMessage();
            }
        }
        return null;
    }

    public Integer getType() {
        return type;
    }

    public void setType(Integer type) {
        this.type = type;
    }

    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }
}
